Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ECP-9196] Add optional quoteId to getShopperReference to allow tokenization for guest shoppers #2620

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

ryan-lambert-IEX
Copy link

@ryan-lambert-IEX ryan-lambert-IEX commented May 22, 2024

Description
This PR addresses #2607 and adds a way to link guest-carts to a predictable but unique shopperReference (guest-cart prefix plus the cartId). If the quoteId is missing, it falls back to the old uuid behavior.

In the above Github issue, I outlined a few possible solutions to our issue. I believe this is the "least invasive" way to achieve our goals.

Tested scenarios
Extended existing unit testing strategy for getShopperReference

Fixes #2607

@RokPopov
Copy link
Contributor

Hi @ryan-lambert-IEX,

Thank you for your contribution, it is greatly appreciated. After reviewing your implementation internally, we have a few suggestions to align the solution with our overall strategy.

We believe it would be beneficial for merchants to have the flexibility to pass their own shopper reference in the request, overriding the default value provided by our plugin. This approach would empower merchants to manage shopper references as per their specific requirements, without the need for additional logic within the plugin. An example of the optional parameter implementation according to our strategy could be found in this PR.

Could you kindly adjust your PR to reflect this feedback? We are confident that these changes will enhance the functionality and usability of the plugin.

Thank you once again for your valuable contribution and collaboration.

Kind regards,
Rok

@ryan-lambert-IEX
Copy link
Author

@RokPopov I made the suggested changes and also tried to import the getShopperReference logic from Requests to Donations since it uses similar code.

I think this will achieve the basic aim of passing in a shopperReference when creating an order. It defaults to the old behavior.

RokPopov
RokPopov previously approved these changes Sep 11, 2024
@candemiralp candemiralp changed the base branch from develop to main September 27, 2024 12:43
@candemiralp candemiralp dismissed RokPopov’s stale review September 27, 2024 12:43

The base branch was changed.

@candemiralp candemiralp changed the title add optional quoteId to getShopperReference to allow tokenization for… [ECP-9196] Add optional quoteId to getShopperReference to allow tokenization for guest shoppers Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ECP-9196] Allow shopperReference to be linked to GuestCustomer
3 participants